<<<<<<< HEAD
<<<<<<< HEAD
/*
 * DropletUtil.h - 
 *
 * Random number generator from Numerical Recipes, 3rd Edition 
 *
 */

#ifdef _WIN32
#pragma once

#ifndef _DROPLET_UTIL
#define _DROPELT_UTIL

#include "inttypes.h"

struct Ran {

	uint64_t u, v, w;

	// Constructor. Call with any integer seed (except value of v below)
	Ran(uint64_t j) : v(4101842887655102017LL), w(1) {
		u = j ^ v; int64();
		v = u; int64();
		w = v; int64();
	}
	
	// Return 64-bit random integer
	inline uint64_t int64() {
		u = u * 2862933555777941757LL + 7046029254386353087LL;
		v ^= v >> 17; v ^= v << 31; v ^= v >> 8;
		w = 4294957665U * (w & 0xffffffff) + (w >> 32);
		uint64_t x = u ^ (u << 21); x ^= x >> 35; x ^= x << 4;
		return (x + v) ^ w;
	}
	
	// Return random double-precision floating value in the range 0. to 1.
	inline double doub() { return 5.42101086242752217E-20 * int64(); }
}	

#endif
=======
/*
 * DropletUtil.h - 
 *
 * Random number generator from Numerical Recipes, 3rd Edition 
 *
 */

#ifdef _WIN32
#pragma once

#ifndef _DROPLET_UTIL
#define _DROPELT_UTIL

#include "inttypes.h"

struct Ran {

	uint64_t u, v, w;

	// Constructor. Call with any integer seed (except value of v below)
	Ran(uint64_t j) : v(4101842887655102017LL), w(1) {
		u = j ^ v; int64();
		v = u; int64();
		w = v; int64();
	}
	
	// Return 64-bit random integer
	inline uint64_t int64() {
		u = u * 2862933555777941757LL + 7046029254386353087LL;
		v ^= v >> 17; v ^= v << 31; v ^= v >> 8;
		w = 4294957665U * (w & 0xffffffff) + (w >> 32);
		uint64_t x = u ^ (u << 21); x ^= x >> 35; x ^= x << 4;
		return (x + v) ^ w;
	}
	
	// Return random double-precision floating value in the range 0. to 1.
	inline double doub() { return 5.42101086242752217E-20 * int64(); }
}	

#endif
>>>>>>> origin/master
=======
/*
 * DropletUtil.h - 
 *
 * Random number generator from Numerical Recipes, 3rd Edition 
 *
 */

#ifdef _WIN32
#pragma once

#ifndef _DROPLET_UTIL
#define _DROPELT_UTIL

#include "inttypes.h"

struct Ran {

	uint64_t u, v, w;

	// Constructor. Call with any integer seed (except value of v below)
	Ran(uint64_t j) : v(4101842887655102017LL), w(1) {
		u = j ^ v; int64();
		v = u; int64();
		w = v; int64();
	}
	
	// Return 64-bit random integer
	inline uint64_t int64() {
		u = u * 2862933555777941757LL + 7046029254386353087LL;
		v ^= v >> 17; v ^= v << 31; v ^= v >> 8;
		w = 4294957665U * (w & 0xffffffff) + (w >> 32);
		uint64_t x = u ^ (u << 21); x ^= x >> 35; x ^= x << 4;
		return (x + v) ^ w;
	}
	
	// Return random double-precision floating value in the range 0. to 1.
	inline double doub() { return 5.42101086242752217E-20 * int64(); }
}	

#endif
>>>>>>> origin/master
